This post helps users of embedded linux platform devices to stream the connected USB cameras over LAN. The method specified is tested with BeagleBoneBlack and RaspberryPi Model 2B running Debian and Raspbian OS respectively.
User need to install VLC inside the Linux running board.
sudo apt-get install vlc
Type the following command to stream camera over the specified port over LAN/WAN.
cvlc v4l2:///dev/video0 :v4l2-standard= :input-slave=alsa://hw:0,0 :live-caching=300 :sout="#transcode{vcodec=WMV2,vb=800,scale=1,acodec=wma2,ab=128,channels=2,samplerate=44100}:http{dst=:8000/stream.wmv}"
Following are the parameters used.
Camera device to stream — /dev/video0
Audio device to capture sound — alsa://hw:0,0
Http port — 8000
Stream address — <IP address>:8000/stream.wmv
vlc http://192.168.0.19:8000/stream.wmv